package entity;

import java.io.Serializable;
import java.util.List;

/**
 * Message 类
 * @param <S> 发送方类型
 * @param <B> 消息主体类型
 * @param <D> 接收方类型
 */
public class Message <S, B, D> implements Serializable{
	
	private S source;
	private D destination;
	private B body;
	private String time;

	public Message(){};

	public Message(S source, D destination, B body, String time) {
		this.source = source;
		this.destination = destination;
		this.body = body;
		this.time = time;
	}


	public S getSource() {
		return source;
	}

	public void setSource(S source) {
		this.source = source;
	}

	public D getDestination() {
		return destination;
	}

	public void setDestination(D destination) {
		this.destination = destination;
	}

	public B getBody() {
		return body;
	}

	public void setBody(B body) {
		this.body = body;
	}

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}
}
